/* 基础样式重置和通用样式 */

/* 重置样式 */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline;
  box-sizing: border-box;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}

body {
  line-height: 1.5;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  &:hover {
    text-decoration: none;
    /* 修复: 使用亮色变体的CSS变量替代Sass的mix函数 */
    color: var(--primary-color-light, #5a8aff);
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 8px;
  &:hover {
    background-color: #a8a8a8;
  }
}

/* 页面标题样式 */
.page-title {
  font-size: var(--font-size-large);
  font-weight: 600;
  color: var(--text-color-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color-light);
}

/* 图标与文字对齐 */
.icon-text {
  display: inline-flex;
  align-items: center;
  
  i, svg {
    margin-right: 5px;
  }
}

/* 重点内容着重显示 */
.emphasize {
  color: var(--primary-color);
  font-weight: bold;
}

/* 日期时间显示样式 */
.datetime {
  color: var(--text-color-secondary);
  font-size: var(--font-size-small);
}

/* 标签样式 */
.tag-item {
  padding: 4px 8px;
  border-radius: var(--border-radius-small);
  font-size: var(--font-size-extra-small);
  margin-right: 5px;
  
  &.primary {
    background-color: rgba(var(--primary-color-rgb, 64, 158, 255), 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(var(--primary-color-rgb, 64, 158, 255), 0.2);
  }
  
  &.success {
    background-color: rgba(var(--success-color-rgb, 103, 194, 58), 0.1);
    color: var(--success-color);
    border: 1px solid rgba(var(--success-color-rgb, 103, 194, 58), 0.2);
  }
  
  &.warning {
    background-color: rgba(var(--warning-color-rgb, 230, 162, 60), 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(var(--warning-color-rgb, 230, 162, 60), 0.2);
  }
  
  &.danger {
    background-color: rgba(var(--danger-color-rgb, 245, 108, 108), 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(var(--danger-color-rgb, 245, 108, 108), 0.2);
  }
}

/* 卡片容器样式 */
.card {
  background: #fff;
  border-radius: var(--border-radius-base);
  box-shadow: var(--box-shadow-light);
  padding: 20px;
  margin-bottom: 20px;
}

/* 表格操作按钮组 */
.table-action-buttons {
  white-space: nowrap;
  
  .el-button {
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* 必填项标记 */
.required-field {
  &::before {
    content: "*";
    color: var(--danger-color);
    margin-right: 4px;
  }
}